package com.tuozixuan.factory.method;

public class CarFactory extends VehicleFactory {

	@Override
	protected Vehicle createVehicle(String size) {
		if ("small".equals(size)) {
			return new SportCar();
		} else if ("large".equals(size)) {
			return new SedanCar();
		}
		
		return null;
	}

}
